﻿using System;
using System.Windows.Input;
using Microsoft.Practices.Prism.ViewModel;

namespace Sautom.Modules.Report.Controls.ViewModels
{
    public sealed class OrderQueryBuilderViewModel : NotificationObject
    {
        #region Constructor
        public OrderQueryBuilderViewModel(ICommand doSearch)
        {
            DoSearch = doSearch;

            StartDate = DateTime.Now.AddMonths(-1);
            EndDate = DateTime.Now;
        }
        #endregion
        
        #region Commands
        public ICommand DoSearch { get; set; }
        #endregion

        #region For View properties
        public string ClientName { get; set; }

        public string SchoolName { get; set; }
        public string CourceName { get; set; }

        private DateTime _startDate;
        public DateTime StartDate
        {
            get { return _startDate; }
            set
            {
                _startDate = value;
                RaisePropertyChanged(() => StartDate);
            }
        }

        private DateTime _endDate;
        public DateTime EndDate
        {
            get { return _endDate; }
            set
            {
                _endDate = value;
                RaisePropertyChanged(() => EndDate);
            }
        }

        #endregion
    }
}